import { config } from '@/config'
import { http } from '@/utils/request'

export async function HttpQueryRepo(data: Record<string, any>) {
    return http({
        url: config.api + '/version/queryRepo',
        data,
    })
}
export async function HttpSaveRepo(data: Record<string, any>) {
    return http({
        url: config.api + '/version/saveRepo',
        data,
    })
}
export async function HttpDeleteRepo(data: Record<string, any>) {
    return http({
        url: config.api + '/version/deleteRepo',
        data,
    })
}

export async function HttpQueryBranch(data: Record<string, any>) {
    return http({
        url: config.api + '/version/queryBranch',
        data,
    })
}
export async function HttpSaveBranch(data: Record<string, any>) {
    return http({
        url: config.api + '/version/saveBranch',
        data,
    })
}
export async function HttpDeleteBranch(data: Record<string, any>) {
    return http({
        url: config.api + '/version/deleteBranch',
        data,
    })
}
export async function HttpQueryFlowVersion(data: Record<string, any>) {
    return http({
        url: config.api + '/version/queryVersion',
        data: { ...data, num: 1 },
    })
}
export async function HttpSetVersionContext(data: Record<string, any>) {
    return http({
        url: config.api + '/version/setVersionContext',
        data,
    })
}
